
using System;
using System.Collections.Generic;

namespace MagicApp.Data
{
	/// <summary>
	/// Description of Hand.
	/// </summary>
	public class Hand
	{
		IList<Card> currentHand;
		public Hand()
		{
			currentHand = new List<Card>();
		}
		public void Add(Card card)
		{
			currentHand.Add(card);
		}
		public Card ReturnRandomCardInHand()
		{
			Random ran = new Random();
			int next = ran.Next(0,currentHand.Count);
			return (Card)currentHand[next];
		}
		 public void Remove(Card card)
        {
        	bool indexOfCard = currentHand.Contains(card);
        	if(indexOfCard)
        	{
        		currentHand.Remove(card);
        	}
        }
		 public IList<Card> GetCurrentHand()
		 {
		 	return currentHand;
		 }
		 public int GetCurrentHandCount()
		 {
		 	return currentHand.Count;
		 }
		 public void Clear()
		 {
		 	currentHand.Clear();
		 }
		 
	}
}
